<template>
  <div>
    <!-- <h2>话题</h2> -->
    <div
      class="box"
      v-for="item in list"
      :key="item.id"
    >
      <img
        :src="item.scene_pic_url"
        alt=""
      >
      <div class="tltle">{{ item.title }}</div>
      <div class="tip">{{ item.subtitle }}</div>
      <div class="price">{{ item.price_info | RMBformat}}</div>
    </div>
  </div>
</template>

<script>
import { GetTopicList } from "@/request/api.js";
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {
    GetTopicList({
      page: this.$route.params.currentPage,
      size: this.$route.params.count,
    }).then((res) => {
      if (res.errno == 0) {
        // console.log("专题res", res);
        this.list = res.data.data;
      }
    });
  },
};
</script>

<style lang="less" scoped>
.box {
  background-color: #fff;
  text-align: center;
  img {
    width: 100%;
    padding-bottom: 1rem;
  }
  .title {
    font-size: 18px;
    margin: 10px 0;
  }
  .tip {
    font-size: 16px;
    margin: 20px 0;
    color: #1f1f1f;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .price {
    color: #9b0000;
    margin-bottom: 1rem;
    padding-bottom: 2.8rem;
  }
}
</style>